home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
doors_1
/
chksec21.zip
/
CHECKSEC.DOC
next >
Wrap
Text File
|
1992-05-03
|
9KB
|
222 lines
This program compliments of: ╓┴╖ ╓┴╖
/ ║ ║ ║ ║ \
╤╕ ╤╕ ╕ ╤╕╤╕╒╕ ┌─┬║┬║┬─┬─┬─┬─┬─┬║┬║┬─┐
││ ││ │ │││││ ▀▀▀▀║▀║▀▀▀▀▀▀▀▀▀▀▀║▀║▀▀▀▀
││ ╤╕ ╒╕ ╕ ╒ ╞╡ ╤╕ ╕ ╒╡ ╒╤ ╤╕ ╞╡╞╡╘╕ ╨ ╨ ╨ ╨
││ │ ╒╡ │││ ││ │ │ ││ ││ ╞╛ ││││ │ FIDO 1:369/2
╧╛ ╧ ╘╧ ╘╧╛ ╧╛ ╧ ╘ ╘╧ ╘╡ ╘╛ ╧╛╧╛╘╛ EchoNet 50:5305/2
│ OurNet 65:613/2
Fort Lauderdale, FL ╘╛ WDNet 3090.00
(305) 523-1717 *HST/DS*
CheckSec v2.1
(c) 1992 by Rich Waugh
PROBLEM: I run an adult game to which I do not wish to allow minor user
access. Unfortunately, I have some minor users who have higher access than
some adults. All my security levels, from new user to visiting SysOp to
Paid Access are set up in parallel: one with adult access, the other
without. The way I have it set up, non-adult access always ends in a 0,
while adult access ends with a 5. For example, NEWUSER has menu access
level 10, while NEWUSER-X (adult at the same level) has an access level of
15. Notice that a simple "if larger than" security level check will not
work for me. I'd like to give access to level 25, but not to level 30. That
is not possible with WildCat!, so I wrote this little utility.
CheckSec provides you with several different methods of checking a user's
AGE or SECURITY LEVEL. You can compare his security level or age to levels
you have chosen and entered in a configuration file. If it finds a match,
the program terminates normally with an error level 0. If it does not find
a match, it exits with an error level equal to his security level. You can
trap this error level in a batch file and determine what action to take
depending on the result found. Alternatively, you can tell CheckSec to
simply exit with an error level equal to security level for all users (no
criteria checking) and branch somewhere in your batch file based on that
error level. Whichever setup you choose, you must run CheckSec.Exe in your
door batch file, prior to running the door itself, and trap the error level
result.
Remember, DOS checks error levels from highest to lowest, so your batch
files must reflect that (see the example Doorx.Bat files to follow). Also,
DOS supports only 256 error levels (0-255). Keep that in mind when setting
up your menu access levels if you intend to use this program!
CheckSec includes all the good CatPatch stuff, like chat, drop to DOS,
timer, monitor detection, customized F Keys, user info, etc; it even
supports locked DTE. CheckSec requires Brun45 in your path.
╔════════════════════════════════════════════════════════════════╗
║ NOTE! The security levels are passed to Door.Sys by the *Menu ║
║ Access Level*, NOT the NAME of the security level, and the ║
║ Menu Access Level is what CheckSec checks. ║
╚════════════════════════════════════════════════════════════════╝
Here's what's required: You must make a file named CheckSec.Cfg in the
directory where you will run the program.
──────────────────────────────────────
SETUP #1 (Error Exit ─ no criteria checking)
EXAMPLE CheckSec.Cfg
DrawBridge BBS <── The name of your BBS
Rich <── SysOp's first name
Waugh <── SysOp's last name
C:\Wc30\Wcwork\Node1\Door.Sys <── Path to Door.Sys
19200 <── Locked DTE rate (or NO)
ERROR LEVEL <── Tell CheckSec to simply exit with an
error level equal to user's security
level
EXAMPLE DoorX.Bat
@Echo Off
CheckSec CheckSec.Cfg
If ErrorLevel 101
Goto END
If ErrorLevel 100
LiveCat Monitor.Cfg Games
Goto END
If ErrorLevel 91
Goto END
If ErrorLevel 90
TimeBank
Goto END
If ErrorLevel 81
Goto END
If ErrorLevel 80
LiveCat Monitor.Cfg Games
Goto END
If ErrorLevel 11
Goto END
If ErrorLevel 10
BobCat
:END
Using this example batch file, all users with Security Levels 80 and 100
would be sent to LiveCat; those at level 90 go to the Time Bank; and those
at level 10 are sent to BobCat. All others get sent right back to the
board.
Using the ERROR LEVEL option in CheckSec bypasses all the comm routines and
is transparent to both the SysOp and the user.
──────────────────────────────────────
SETUP #2 (Security Level Checking)
EXAMPLE CheckSec.Cfg
DrawBridge BBS <── The name of your BBS
Rich <── SysOp's first name
Waugh <── SysOp's last name
C:\Wc30\Wcwork\Node1\Door.Sys <── Path to Door.Sys
19200 <── Locked DTE rate (or NO)
SECURITY <── If you want to check by Security Level
25 ─┐
35 │ The various MENU ACCESS LEVELS you want
45 │ to allow access to the door. You may enter
55 │ up to 100 levels, one per line.
65 ─┘
EXAMPLE DoorX.Bat
@Echo Off
Cd \Doors\TimeBank
CheckSec CheckSec.Cfg
If ErrorLevel 1 Goto END
TimeBank
:END
Using this method of set-up, CheckSec will check the user's Security Level
against the various levels you have entered in CheckSec.Cfg. If it finds a
match, CheckSec will exit with error level 0, otherwise it will exit with
an error level equal to the user's security level. This can likewise be
trapped in a batch file.
Using the above example files, users at security levels 25, 35, 45, 55 & 65
would get to the Time Bank, all others go back to the board.
──────────────────────────────────────
Finally, if you don't care about Security Level access, you can configure
CheckSec to check the user's age instead.
SETUP #3 (Checking User's Age)
EXAMPLE CheckSec.Cfg
DrawBridge BBS <── The name of your BBS
Rich <── SysOp's first name
Waugh <── SysOp's last name
C:\Wc30\Wcwork\Node1\Door.Sys <── Path to Door.Sys
NO <── Locked DTE rate (or NO)
AGE=21 <── The minimum age you want to give access to
EXAMPLE DoorX.Bat
@Echo Off
Cd \Doors\Fantasy
CheckSec CheckSec.Cfg
If ErrorLevel 1 Goto END
Fantasy C:\Wc30\Wcwork\Node1\ /BDrawBridge /D /ORich_Waugh /P50 /M1
:END
Here, nobody under the age of 21 gets access to the door. If CheckSec exits
with error level other than 0 (he's a kid!), we skip the door and simply
return him back to the board. That's all there is to it.
──────────────────────────────────────
CheckSec is distributed as Nobitchware. I'm not charging anything for it,
so you are NOT entitled to bitch about it!!!
I, for one, am sick and tired of people who solicit money for the dumb
little doors/utilities we all find so indespensible, so this one's a
freebie. It is fully functional and contains no time bombs. If you find it
handy, give the DrawBridge a call and thank me. If you don't find it
useful, I'll cheerfully refund double your money!
Rich Waugh
──────────────────────────────────────
Acknowledgements: CheckSec was written in Quick Basic 4.5 using Jim
Brewer's CatPatch routines modified for WildCat! 3.x;
with ASM routine for error level exit by Dave Cleary.
──────────────────────────────────────
History:
Version 2.1: Added the ERROR LEVEL option. Cleaned up code; more cosmetic
changes.
Version 2.0: Another bug fix. The Catpatch routines for setting baud rate
were incorrect if the cfg file did not specify a locked DTE.
It should work correctly now for those who have it set to
"NO".
Versions 1.8 - 1.9: Mostly code clean-ups, some cosmetic changes. Not
released.
Version 1.7: Found and squished a bug in the modification of CatPatch which
was causing dropped carrier - only if the user failed the test
- maybe I should have left that in! <grin>.
Versions 1.4 - 1.6: Mostly code clean-ups, some cosmetic changes.
Version 1.3: Added the comm routines so the remote user can see what's
going on!
Version 1.2: Added the age-checking routine.
Version 1.1: Cleaned up the code and added some color to the video output.
Version 1.0: Original release.